<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/admintemplate.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateTopicTitle}"></h:outputText>
        </ui:define>
        <ui:define name="leftmenu">
            <h:form>
                <ul class="section menu">
                    <li><a class="menuitem">#{bundle.ControlPanelMenu}</a>
                        <ul class="submenu">
                            <li><h:commandLink action="#{topicController.prepareCreate}" value="#{bundle.ListTopicCreateLink}"/> </li>
                            <li><h:commandLink action="#{topicController.prepareList}" value="#{bundle.CreateTopicShowAllLink}" immediate="true"/> </li>
                        </ul>
                    </li>
                </ul>
            </h:form>
        </ui:define>
        <ui:define name="content">
            <h2>#{bundle.CreateTopicTitle}</h2>
            <div class="block">
                <h:panelGroup id="messagePanel" layout="block">
                    <h:messages errorStyle="color: red" infoStyle="color: green" layout="list"/>
                </h:panelGroup>
                <h:form>
                    <table class="form">
                        <tr>
                            <td class="col1">
                                <h:outputLabel value="#{bundle.CreateTopicLabel_topicName}" for="topicName" />
                            </td>
                            <td class="col2">
                                <h:inputText id="topicName" class="mini" value="#{topicController.selected.topicName}" title="#{bundle.CreateTopicTitle_topicName}" required="true" requiredMessage="#{bundle.CreateTopicRequiredMessage_topicName}"/>
                                <!--<h:message for="topicName" class="error"></h:message>!-->
                            </td>
                        </tr>
                    </table>
                    <h:commandLink action="#{topicController.create}" class="btn-icon btn-teal btn-plus btn-small">
                        <span></span>
                        #{bundle.CreateTopicSaveLink}
                    </h:commandLink>
                    <!--<h:link outcome="/index" value="#{bundle.CreateTopicIndexLink}"/>!-->
                </h:form>
            </div>
        </ui:define>
    </ui:composition>
</html>
